﻿using System;

namespace IdeaNMR.Shared.Utils
{
    public static class StringExtensions
    {
        /// <summary>
        /// Converts all new line charachters in the string to Environment.NewLine
        /// </summary>
        public static string ToLocalNewLine(this string text)
        {
            return text.Replace("\r\n", "\n").Replace("\r", "\n").Replace("\n", Environment.NewLine);
        }
    }
}
